package srx.open.com.utils;

import android.content.Context;
import android.view.View;
import android.widget.Toast;

/**
 * 用于提示消息的覆盖.
 * 
 * @author hailongqiu 356752238@qq.com
 *
 */
public class OpenToast {

	static Toast mToast;

	public static void initToast(Context context) {
		mToast = new Toast(context);
		mToast = Toast.makeText(context, "", 300);
	}

	/**
	 * 对话框提示.
	 */
	public static void showMsg(String msg) {
		if (mToast != null) {
			mToast.setText(msg);
			mToast.show();
		}
	}

	public static void showMsg(int id) {
		if (mToast != null) {
			mToast.setText(id);
			mToast.show();
		}
	}
}
